package com.example.conexion;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class ReceiverBoot extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {

		// LANZAR SERVICIO
		Intent serviceIntent = new Intent();
		serviceIntent.setAction("com.imaginagroup.serviceboot.MyService");
		context.startService(serviceIntent);

		// LANZAR ACTIVIDAD
		Intent i = new Intent(context, MainActivity.class);
		i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		context.startActivity(i);

	}
}
